import { Module, forwardRef } from '@nestjs/common';
import { SchoolService } from './school.service';
import { SchoolController } from './school.controller';
import { TypeOrmModule } from '@nestjs/typeorm';
import { UserModule } from '../user/user.module';
import { School } from './entities/school.entity';
import { MajorModule } from '../major/major.module';
import { TeacherModule } from '../teacher/teacher.module';
import { jwtConstants, signOptions } from 'src/common/auth/constants';
import { JwtModule } from '@nestjs/jwt';

@Module({
  imports: [
    TypeOrmModule.forFeature([School]),
    JwtModule.register({
      secret: jwtConstants.secret,
      signOptions,
    }),
    // forwardRef(() => UserModule),
    // forwardRef(() => MajorModule),
    // forwardRef(() => TeacherModule),
  ],
  controllers: [SchoolController],
  providers: [SchoolService],
  exports: [SchoolService]
})
export class SchoolModule { }
